package test;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import yns.http.HttpHelper;
import yns.http.HttpProperty;
import yns.http.HttpRequest;
import yns.http.HttpResponse;


public class testHttpHelper {

	public static void main(String[] args) throws IOException {
		HttpRequest httpRequest = new HttpRequest();
		HttpResponse httpResponse = new HttpResponse();
		HttpHelper httpHelper = new HttpHelper();
		
		String url = "https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu&wd=servlet%20response&rsv_pq=f2374c29000016ed&rsv_t=90e176V4ObXeRt9%2BU38pYqPRZ7BD0%2FDVWImXWPn9FILJ9ezW%2F6rI1%2B1uJkI&rsv_enter=1&oq=ser&inputT=3752&rsv_sug3=7&rsv_sug1=3&bs=servlet";
		
		httpRequest.setSendURL(url);
		httpRequest.setRequestMethod(HttpProperty.GET);
		
		httpHelper.execute(httpRequest, httpResponse);
		
		System.out.println(httpRequest.getRequestProperty());
		System.out.println(httpResponse.getResponseResult().toString());
	}

}
